var box = document.querySelector(".box");
for ( var i = 0; i < 5; i++) {
    var pai = document.createElement("div"); 
    pai.innerHTML = i;
    pai.classList.add('myClass');
    box.appendChild(pai); 
}
var start = function (){
    console.log(random());
    for (let z = 0; z < 5; z++){
        var pke = document.createElement("div");
        // pke.innerHTML = random();
        // pke.innerHTML = "<img src="+"img/"+random()+".jpg"+" alt='' />"
        pke.innerHTML ="<div class='container'>"+"<div class='front'>"+"<img src="+"img/"+random()+".jpg"+" alt='' />"+"</div>"+
                        "<div class='back'><img src='img/bm.jpg' alt='' /></div> "+"</div> ";
        box.children[z].appendChild(pke);
    }
}

//随机获取1到54的整数
function random(min = 1, max = 54) {
    return Math.floor(Math.random() * (max - min)) + min;
}
  